import numpy as np


def findtwomax(A):
    B = np.array(A)
    for i in range(len(A)):  # A1矩阵的行
        flag1 = A[0][0]
        flg1 = 0
        for j in range(len(A[0])):  # A2矩阵的列
            if abs(flag1) < abs(A[i][j]):
                flag1 = A[i][j]
                flg1 = j
        A[i][flg1] = 0
        j = 0
        flag1 = A[0][0]
        flg1 = 0
        for j in range(len(A[0])):  # A2矩阵的列
            if abs(flag1) < abs(A[i][j]):
                flag1 = A[i][j]
                flg1 = j
        A[i][flg1] = 0
    C = np.array(A)
    return np.subtract(B, C)


A = [[1, 2.588 + 4j, -1], [1 + 2j, 55, -1j], [1 + 8j, -2, 9j]]
print(findtwomax(A))
